package com.hotline.communication.enums;


public enum CallLogOperationTypeEnum {

    IVR(1,"进IVR"),

    QUEUE(2,"排队"),

    CALL(3,"开始通话"),

    HANG_UP(4,"挂机"),

    QUEUE_CONTINUE(5,"继续排队");
    /**
     * 编码
     */
    private Integer code;

    /**
     * 名称
     */
    private String name;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }



    CallLogOperationTypeEnum(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    public static CallLogOperationTypeEnum getCallLogOperationTypeEnum(Integer code){
        for (CallLogOperationTypeEnum callLogOperationTypeEnum : CallLogOperationTypeEnum.values()){
            if(callLogOperationTypeEnum.getCode().equals(code)){
                return callLogOperationTypeEnum;
            }
        }
        return null;
    }
}
